<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <!--
    <link href="../static/bootstrap/css/bootstrap-responsive.css" rel="stylesheet" type="text/css"/>
    <link href="../static/bootstrap/css/docs.css" rel="stylesheet" type="text/css"/>
    -->
   <link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css"/>
   <link href="/static/viewback/css/mycss.css" rel="stylesheet" type="text/css"/>
   <title>版块信息编辑</title>
</head>
<body>
<div class="header"></div>
<include file="public:header"/>
<ul class="breadcrumb">
    <li>
      <a href="/Admin/user/userList" title="后台管理"><i class="icon-home"></i></a> <span class="divider">/</span>
    </li>
    <li>
      <a href="/Admin/forum/forumList" title="板块管理">版块管理</a> <span class="divider">/</span>
    </li>
    <li class="active" title="板块编辑">版块编辑</li>
 </ul>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span2">
                <include file="public:leftbar"/>
            </div>
            <div class="span10">
                <form class="form-horizontal" action="/Admin/forum/editSave" method="POST">
                    <fieldset>
                        <legend><h3>版块编辑</h3></legend>
                        
                            <table class="table table-bordered table-hover table-striped">
                                <tr><th>ID</th><th>版块名称</th><th>父版区名称</th><th>主题数</th></tr>
                                <tr>
                                    <td><input name="forum_id" type="hidden" value="{$forumInfo.id}">{$forumInfo.id}</td>
                                    <td><input readonly class="span5" id="forum-name" type="text" name="forum_name" value="{$forumInfo.forum_name}" style="border: 0px;"></td>
                                    <td>
                                        <select name="parent" style="display: none">
                                            <option value="{$forumInfo.parent_forum_id}-{$forumInfo.parent_forum_name}">—请选择父版区—</option>
                                            <volist name="parentList" id="parent">
                                                <option value="{$parent.id}-{$parent.forum_name}">{$parent.forum_name}</option>
                                            </volist>
                                        </select>
                                        <span id="parent-now">{$forumInfo.parent_forum_name}</span>
                                    </td>
                                    <td>{$forumInfo.theme_count}</td>
                                </tr>
                                <tr>
                                    <td>操作</td>
                                    <td colspan="3">
                                        <input type="button" value="编辑" class="btn btn-primary" id="edit">
                                        <input type="submit" value="保存" class="btn btn-danger" style="display: none" id="save">
                                    </td>
                                </tr>
                            </table>
                    </fieldset>
                </form>
            </div>
        </div>
</div>
<div class="footer"></div>
<include file="public:footer"/>
<script type="text/javascript" src="/static/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="/static/viewback/js/jquery-1.8.3.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
       $('#edit').click(function(){
           $('select').css('display','block');
           $('#parent-now').css('display','none');
           $('input#forum-name').attr('readonly', false);
           $(this).css('display', 'none');
           $('#save').css('display', 'block');
       });
    });
</script>
</body>
</html>

